package com.bracelet.service;

import com.bracelet.beans.Route;
import com.bracelet.dao.RouteDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;

@Service
public class RouteService {

    @Resource
    private RouteDao routeDao;

    public int saveRoute(int userId, double lat, double log){
        return routeDao.insert(new Route(userId, lat, log));
    }

    public ArrayList<Route> getRoute(int userId){
        return routeDao.select(userId);
    }

}
